package com.bci.pwtz.mysql.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bci.pwtz.mysql.model.Dybx;
import com.bci.pwtz.mysql.model.Dypdx;

public interface DypdxMapper {
    int deleteByPrimaryKey(String deviceid);

    int insert(Dypdx record);

    int insertSelective(Dypdx record);

    Dypdx selectByPrimaryKey(String deviceid);

    int updateByPrimaryKeySelective(Dypdx record);

    int updateByPrimaryKey(Dypdx record);
    
    int deleteById(@Param("deviceid")String deviceid,@Param("lastmodifiedtime")Date time);
    
    List<Dypdx> selectDeviceList(@Param("devicename")String deviceName,@Param("companyid") Long companyid,@Param("companyids")String[] companyids,@Param("portalType") int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("lineCode")String lineCode,@Param("beginTime") String beginTime,@Param("endTime") String endTime,
            @Param("beginIndex") int benginIndex, @Param("pageSize") int pageSize,@Param("currentDeviceId")String currentDeviceId);
    
    int selectDeviceCount(@Param("devicename")String deviceName,@Param("companyid") Long companyid,@Param("companyids")String[] companyids,@Param("portalType") int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("lineCode")String lineCode,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
    
    List<Dypdx> getSamePreDeviceList(@Param("deviceid")String deviceid);
    
    List<Dypdx> selectByPreDeviceCode(@Param("predevicecode")String predevicecode);
    
    int updateLastSyncDevice(@Param("companyId")Long companyId,@Param("lastSyncTime")String lastSyncTime);
}